package com.easy.service.impl;

import com.easy.bean.Bed;
import com.easy.dao.IBedDao;
import com.easy.service.IBedService;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BedService implements IBedService {
    @Autowired
    IBedDao dao;

    @Override
    public List<Bed> getBed(Bed bed, Page page) {
        return dao.getBed(bed,page);
    }

    @Override
    public int addBed(Bed bed) {
        return dao.addBed(bed);
    }

    @Override
    public Bed getBedById(int id) {
        return dao.getBedById(id);
    }

    @Override
    public int editBed(Bed bed) {
        int count=dao.editBed(bed);
        return count;
    }

    @Override
    public int updateBed(int id) {
        int count=dao.updateBed(id);
        return count;
    }

    @Override
    public int updateBedStatus(int id) {
        int count=dao.updateBedStatus(id);
        return count;
    }

    @Override
    public int delBed(int id) {
        return 0;
    }

    @Override
    public int getCount(Bed bed) {
        return dao.getCount(bed);
    }

    @Override
    public List<Bed> getBednember() {
        return dao.getBednember();
    }

    @Override
    public List<Bed> getBednemerByWid(Bed bed) {
        return dao.getBednemerByWid(bed);
    }

}
